package cn.tedu.four.mapper;

import ch.qos.logback.classic.Logger;
import org.apache.ibatis.javassist.compiler.ast.Variable;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.util.DigestUtils;

/**
 * ClassName: Slf4j
 * Package: cn.tedu.four.mapper
 * Description:
 *
 * @Author: @Albert
 * @Version: 1.0
 */
@SpringBootTest
@lombok.extern.slf4j.Slf4j
public class Slf4j {
    @Test
    public void test() {
        log.debug("输出debug语句");
        log.info("输出info语句");
        log.warn("输出warn语句");
        log.error("输出error语句");
        int x = 1;
        int y = 3;
        log.info("x={},y={},x+y={}",x,y,x+y);
        System.out.println("x="+x+",y="+y+",x+y="+(x+y));
    }
    @Test
    void encode(){
        String word ="140729..gw";
        String salt = "23wef25rewsf";
        String s = DigestUtils.md5DigestAsHex(word.getBytes());
        System.out.println(s);
        String s1 = DigestUtils.md5DigestAsHex((word + salt).getBytes());
        System.out.println(s1);
    }



}
